package com.naiterui.ehp.bp.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

/**
 * <P>功能描述 : 医生自定义收费服务订单 </P>
 * <P>File name : DrCustomChargeOrder </P>
 * <P>Author : 王泽浩 </P>
 * <P>E-Mail : 1028625100@qq.com </P>
 * <P>Date : 2017/3/30 上午10:40</P>
 */
@Entity
@Table(name = "dr_custom_charge_order")
public class DrCustomChargeOrder implements java.io.Serializable {

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Long id;

    /**
     * 自定义服务收费表主键
     */
    @Column(name = "dr_custom_charge_id")
    private Long drCustomChargeId;

    /**
     * 订单号，不能重复，只能唯一
     */
    @Column(name = "order_sn", nullable = false)
    private String orderSn;

    /**
     * 订单状态 1:待支付，2:已支付，3：支付失败 4:支付中 5：订单已关闭 默认1
     */
    @Column(name = "pay_status", nullable = false)
    private Integer payStatus;

    /**
     * 创建时间
     */
    @Column(name = "created_at", nullable = false)
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by", nullable = false)
    private String createdBy;

    /**
     * 更新时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 更新人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 版本
     */
    @Version
    private Integer version;

    public DrCustomChargeOrder() {

    }

    public DrCustomChargeOrder(Long drCustomChargeId, String orderSn) {
        this.drCustomChargeId = drCustomChargeId;
        this.orderSn = orderSn;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getDrCustomChargeId() {
        return this.drCustomChargeId;
    }

    public void setDrCustomChargeId(Long drCustomChargeId) {
        this.drCustomChargeId = drCustomChargeId;
    }

    public String getOrderSn() {
        return this.orderSn;
    }

    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }

    public Integer getPayStatus() {
        return this.payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    public Date getCreatedAt() {
        return this.createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public String getCreatedBy() {
        return this.createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public Date getChangedAt() {
        return this.changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }

    public String getChangedBy() {
        return this.changedBy;
    }

    public void setChangedBy(String changedBy) {
        this.changedBy = changedBy;
    }

    public Integer getVersion() {
        return this.version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Override
    public String toString() {
        return "DrCustomChargeOrder{" + "id=" + this.id + ", drCustomChargeId=" + this.drCustomChargeId + ", orderSn='" + this.orderSn + '\''
                + ", payStatus=" + this.payStatus + ", createdAt=" + this.createdAt + ", createdBy='" + this.createdBy + '\'' + ", changedAt="
                + this.changedAt + ", changedBy='" + this.changedBy + '\'' + ", version=" + this.version + '}';
    }
}
